//
// Created by 30986 on 2020/11/23.
//


#include<iostream>
using namespace std;
//计算长方形的面积和周长
class Rectangle
{
private:
    double length;
    double wide;
public:
    Rectangle(double x,double y):length(x),wide(y){}
    double area();
    double perimeter();
};
double Rectangle::area()
{
    return length*wide;
}
double Rectangle::perimeter()//周长
{
    return 2*(length+wide);
}

int main()
{

    double a,b;
    cin>>a>>b;
    Rectangle r(a,b);
    cout<<"长方形的面积为："<<r.area()<<"\n"
        <<"长方形的周长为："<<r.perimeter()<<endl;
}